//
//  JMPhoneCodeTool.h
//  XPBiPro
//
//  Created by liuny on 2018/5/17.
//  Copyright © 2018年 liuny. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, SendPhoneCodeType) {
    SendPhoneCodeType_Register = 0,
    SendPhoneCodeType_Transfer,
    SendPhoneCodeType_Password,
    SendPhoneCodeType_Set_transfer_password
};

@interface JMPhoneCodeTool : NSObject
@property(nonatomic,strong) NSString *phoneNum;
@property(nonatomic,strong) NSString *areaId;
@property(nonatomic,copy) void(^ErrorBlock)(NSString*errorMsg);
/**
 初始化

 @param phoneCodeButton 点击发送验证码的按钮
 @param type 操作类型
 @return JMPhoneCodeTool对象
 */
-(instancetype)initWithPhoneCodeButton:(UIButton *)phoneCodeButton
                                  type:(SendPhoneCodeType)type;
/**
 发送验证码
 */
-(void)sendPhoneCode;

/**
 //停止计时
 */
-(void)stopTimer;
@end
